<nav>
<?php $id = $sf_user->getAttribute('beca_id') ?>
<?php $id_documento = $sf_user->getAttribute('documento_id') ?>
    <?php if(($id == '') && ($id_documento == '')):?>
        <?php include_partial('menu', array('id'=> 1, 'documento_id'=>1))?>
    <?php else:?>
        <?php include_partial('menu', array('id'=> $id, 'documento_id'=>$id_documento))?>
    <?php endif;?>
</nav>
<article>
    
<table>
  <thead>  
    <tr>
        <th colspan="3"><h2 id="titulo_form">LISTADO DOCUMENTOS RELACIONADOS</h2></th>
    </tr>
    <tr>
      <th>Nombre Convocatoria</th>
      <th colspan="5">Documentos Asociados</th>      
    </tr>
  </thead>
  <tbody>

      
        
    <?php foreach ($codigos as $cod): ?>
      <tr>
          <th><?php echo $cod[1]?></th>
      </tr>
      <?php for( $i = 0; $i< count($cod[2]); $i++):;?>      
      <tr>
          <td></td>
          <td><a href="<?php echo url_for('documentos_beca/show?beca_id='.$cod[0].'&documento_id='.$cod[2][$i]) ?>"><?php echo $cod[3][$i]?></a></td>
      </tr>      
      <?php endfor;?>          
    <?php endforeach; ?>
  </tbody>
</table>
    </article>
<footer>
    <?php $module= $sf_user->getAttribute('modulo') ?>
    <?php if ($module == ''):?>
        <form action="<?php echo url_for('becas/index')?>" method="post" />      
        <input type="submit" title="Haga clic para retornar al modulo de becas" value="Volver"/>      
        </form>
    <?php else:?>        
        <form action="<?php echo url_for($module.'/index')?>" method="post" />      
        <input type="submit" title="Haga clic para retornar al modulo de becas" value="Volver"/>      
        </form>
    <?php endif;?>    
</footer>